home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 November / Pcwk1197.iso / LOTUS / Eng-ins / SMASTERS / APPROACH / CHECKBK.MPR / SCRIPT / ApproachDoc / Data Entry Screen / Body / VoidButton.s (.txt) < prev   
Null Bytes Alternating  |  1997-01-09  |  3KB  |  40 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As BUTTON
  11.     Set Source = Bind(Objectname_)
  12.     On Event Click From Source Call Click
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Click:1:12
  16. Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  17.     If source.text="Apply this transaction to the balance" Then    
  18.         RunApproachMacro("CommitFlagOn")
  19.         If source.transtype.text="Check" Then
  20.             RunApproachMacro("SubtractFromBalance")
  21.             RunApproachMacro("IncrementCheckNumber")
  22.         Else 
  23.             If source.transtype.text="Deposit" Then
  24.                 RunApproachMacro("AddToBalance")
  25.                 RunApproachMacro("IncrementDepositNumber")
  26.             Else
  27.                 RunApproachMacro("SubtractFromBalance")
  28.             End If
  29.         End If    
  30.         source.text="Remove this transaction from the balance"
  31.     Else
  32.         RunApproachMacro("CommitFlagOff")
  33.         If source.transtype.text="Check" Then
  34.             RunApproachMacro("AddToBalance")
  35.         Else 
  36.             RunApproachMacro("SubtractFromBalance")
  37.         End If
  38.         source.text="Apply this transaction to the balance"
  39.     End If
  40. End Sub